<template>
  <div>
    <div><el-button type="warning" icon="el-icon-back" size="small" @click.stop="$router.go(-1)">返回</el-button></div>
    <div style="display: flex;flex-direction: column;align-items: center;"><iframe :src="src" frameborder="0" width="375px" height="750px"></iframe></div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      src: 'https://jypt.kaibujiaoyu.com/h5/wx/index.html#/'
    }
  },
  beforeRouteEnter(to, from, next) {
    next(vm => {
      const { id, type } = to.query
      vm.src = `${vm.src}?id=${id}&openId=0&source=2&type=${type}`
      console.log('%c December0v0 ','background-image:linear-gradient(135deg,#BC95C6,#8b7042);color:#fff;',
      vm.src)
    })
  }
}
</script>
